package com.zhao.component;

import javax.management.OperationsException;
import javax.naming.OperationNotSupportedException;

public abstract class MenuComponent {

    //菜单名
    protected String name;

    //菜单等级
    protected Integer level;

    public void add(MenuComponent menuComponent) throws OperationNotSupportedException {
        throw new OperationNotSupportedException();
    }

    public void remove(Integer index) throws OperationNotSupportedException {
        throw new OperationNotSupportedException();
    }

    public abstract void print();
}
